At very low resolutions, 1/3 of the screen height might not be enough
for the minimum height of the OSK, causing some keys to get pushed out
of the screen. This now ensures the height is always at least the
minimum height, but only up to 1/2 of the screen to avoid situations
where the OSK would cover the whole screen preventing any other
interaction.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/9126
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4156>
_relayout() {
const monitor = Main.layoutManager.keyboardMonitor;
+ const [minHeight] = this.get_preferred_height(-1);
if (!monitor)
return;
this.height = monitor.height / 3;
else
this.height = monitor.height / 4;
+
+ this.height = Math.clamp(this.height, minHeight, monitor.height / 2);
}
_updateKeys() {